.. _Regional_Data: Working with SOEP Regional Data ********************************** .. |Regional Data| raw:: html Regional Data .. |Regional Data2| raw:: latex \href{https://www.diw.de/en/diw_01.c.613986.en/linking_possibilities.html}{\textbf{Regional Data}} .. |persnr ppfad| raw:: html "persnr" .. |persnr ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/persnr}{\textbf{"persnr"}} .. |hhnr ppfad| raw:: html "hhnr" .. |hhnr ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/hhnr}{\textbf{"hhnr"}} .. |bghhnr ppfad| raw:: html "bghhnr" .. |bghhnr ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/bghhnr}{\textbf{"bghhnr"}} .. |sex ppfad| raw:: html "sex" .. |sex ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/sex}{\textbf{"sex"}} .. |gebjahr ppfad| raw:: html "gebjahr" .. |gebjahr ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/gebjahr}{\textbf{"gebjahr"}} .. |bgnetto ppfad| raw:: html "bgnetto" .. |bgnetto ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/bgnetto}{\textbf{"bgnetto"}} .. |bgpop ppfad| raw:: html "bgpop" .. |bgpop ppfad2| raw:: latex \href{https://paneldata.org/soep-core/data/ppfad/bgpop}{\textbf{"bgpop"}} .. |bgphrf phrf| raw:: html "bgphrf" .. |bgphrf phrf2| raw:: latex \href{https://paneldata.org/soep-core/data/phrf/bgphrf}{\textbf{"bgphrf"}} .. |bgp0101 bgp| raw:: html "bgp0101" .. |bgp0101 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0101}{\textbf{"bgp0101"}} .. |bgp0102 bgp| raw:: html "bgp0102" .. |bgp0102 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0102}{\textbf{"bgp0102"}} .. |bgp0103 bgp| raw:: html "bgp0103" .. |bgp0103 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0103}{\textbf{"bgp0103"}} .. |bgp0104 bgp| raw:: html "bgp0104" .. |bgp0104 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0104}{\textbf{"bgp0104"}} .. |bgp0105 bgp| raw:: html "bgp0105" .. |bgp0105 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0105}{\textbf{"bgp0105"}} .. |bgp0106 bgp| raw:: html "bgp0106" .. |bgp0106 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0106}{\textbf{"bgp0106"}} .. |bgp0107 bgp| raw:: html "bgp0107" .. |bgp0107 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0107}{\textbf{"bgp0107"}} .. |bgp0108 bgp| raw:: html "bgp0108" .. |bgp0108 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0108}{\textbf{"bgp0108"}} .. |bgp0109 bgp| raw:: html "bgp0109" .. |bgp0109 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0109}{\textbf{"bgp0109"}} .. |bgp0110 bgp| raw:: html "bgp0110" .. |bgp0110 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0110}{\textbf{"bgp0110"}} .. |bgp0111 bgp| raw:: html "bgp0111" .. |bgp0111 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0111}{\textbf{"bgp0111"}} .. |bgp0112 bgp| raw:: html "bgp0112" .. |bgp0112 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp0112}{\textbf{"bgp0112"}} .. |bgp143 bgp| raw:: html "bgp143" .. |bgp143 bgp2| raw:: latex \href{https://paneldata.org/soep-core/data/bgp/bgp143}{\textbf{"bgp143"}} .. |bgsampreg bghbrutto| raw:: html "bgsampreg" .. |bgsampreg bghbrutto2| raw:: latex \href{https://paneldata.org/soep-core/data/bghbrutto/bgsampreg}{\textbf{"bgsampreg"}} .. |bgbula bghbrutto| raw:: html "bgbula" .. |bgbula bghbrutto2| raw:: latex \href{https://paneldata.org/soep-core/data/bghbrutto/bgbula}{\textbf{"bgbula"}} .. |bgregtyp bghbrutto| raw:: html "bgregtyp" .. |bgregtyp bghbrutto2| raw:: latex \href{https://paneldata.org/soep-core/data/bghbrutto/bgregtyp}{\textbf{"bgregtyp"}} SOEP offers diverse possibilities for regional and spatial analysis. With the anonymized regional information on SOEP respondents' (households' and individuals') place of residence, it is possible to link numerous regional indicators on the levels of the federal states (Bundesländer), spatial planning regions, districts, and postal codes with the data on the SOEP households. However, specific security provisions must be made due to the sensitivity of the data under data protection law. Accordingly, data users are not allowed to give any information in their analyses that could indicate, for instance, the city or district in which respondents reside. The data nevertheless provide valuable background information for regional analysis. .. figure:: png/editions.png :align: center For more information and to access the data, see |Regional Data| |Regional Data2| Assume that for your research project, you want to measure current (2016) urban-rural differences in the population. You are particularly interested in the differences in interest in politics and the different satisfaction variables provided by the SOEP. You also want to take into account demographic differences in gender and age. To be able to evaluate the potential of the data for your project, you first need an overview. For regional analysis, for example, the municipal size classes from the regional data are suitable. **Create an exercise path with four subfolders:** .. figure:: png/uebungspfade.png :align: center **Example:** - H:/material/exercises/do - H:/material/exercises/output - H:/material/exercises/temp - H:/material/exercises/log These are used to store your script, log files, datasets, and temporary datasets. Open an empty do-file and define your paths with globals: .. literalinclude:: docs/regional_data.do :linenos: :lines: 8-17 The global "AVZ" defines the main path. The main paths are subdivided using the globals "MY_IN_PATH", "MY_DO_FILES", "MY_LOG_OUT", "MY_OUT_DATA", "MY_OUT_TEMP". The global "MY_IN_PATH" contains the path to the data you ordered. **a) Prepare a dataset for cross-sectional analysis covering the survey year 2016 (wave bg).** To perform your analysis, you need different SOEP variables. The SOEP offers various options for a variable search: - Search the questionnaires for useful variables (for more information, see the section :ref:`quest_search`) - Find a suitable variable in the topic list on paneldata.org (for more information, see the section :ref:`topic`) - Search for a suitable variable using a search term in paneldata.org (for more information, see the section :ref:`var_search`) - Use the documentation provided by the generated variables (for more information, see the section :ref:`documentation`) Your source file should contain the following variables: - Permanent Individual ID |persnr ppfad| |persnr ppfad2| - Original Household Number |hhnr ppfad| |hhnr ppfad2| - Current Wave Household Number |bghhnr ppfad| |bghhnr ppfad2| - The Sex of the Person |sex ppfad| |sex ppfad2| - Year of Birth |gebjahr ppfad| |gebjahr ppfad2| - Survey Status 2016 |bgnetto ppfad| |bgnetto ppfad2| - Sample Membership 2016 |bgpop ppfad| |bgpop ppfad2| - Weighting Factor 2016 |bgphrf phrf| |bgphrf phrf2| - Satisfaction With Health |bgp0101 bgp| |bgp0101 bgp2| - Satisfaction With Sleep |bgp0102 bgp| |bgp0102 bgp2| - Satisfaction With Work |bgp0103 bgp| |bgp0103 bgp2| - Satisfaction With Housework |bgp0104 bgp| |bgp0104 bgp2| - Satisfaction With Household Income |bgp0105 bgp| |bgp0105 bgp2| - Satisfaction With Personal Income |bgp0106 bgp| |bgp0106 bgp2| - Satisfaction With Dwelling |bgp0107 bgp| |bgp0107 bgp2| - Satisfaction With Amount Of Leisure Time |bgp0108 bgp| |bgp0108 bgp2| - Satisfaction With Child Care |bgp0109 bgp| |bgp0109 bgp2| - Satisfaction With Family Life |bgp0110 bgp| |bgp0110 bgp2| - Satisfaction With Social Life |bgp0111 bgp| |bgp0111 bgp2| - Satisfaction with Democracy |bgp0112 bgp| |bgp0112 bgp2| - Political Interest |bgp143 bgp| |bgp143 bgp2| - Current Sample Region |bgsampreg bghbrutto| |bgsampreg bghbrutto2| - Federal State |bgbula bghbrutto| |bgbula bghbrutto2| - Spatial Category by BBSR |bgregtyp bghbrutto| |bgregtyp bghbrutto2| - Municipal Class Sizes "ggk" Use the key variables from the ppath.dta dataset as your starting file. .. literalinclude:: docs/regional_data.do :linenos: :lines: 19 .. Attention:: Please note that since version 34 (v34), PPFAD can be found in the subdirectory “Raw” of the data distribution file. The following exercises are done with version 33.1 (v33.1), where the tracking file was named PPFAD. Keep people who completed a questionnaire in 2016 and lived in a private household. .. literalinclude:: docs/regional_data.do :linenos: :lines: 21-26 Prepare the different datasets bgp, bghbrutto, regionl .. literalinclude:: docs/regional_data.do :linenos: :lines: 28-46 Merge all datasets. .. literalinclude:: docs/regional_data.do :linenos: :lines: 48-52 Recode negative values as missings. .. literalinclude:: docs/regional_data.do :linenos: :lines: 54-55 Categorize the municipal class sizes from the SOEP regional dataset. .. literalinclude:: docs/regional_data.do :linenos: :lines: 57-68 Generate an age variable. .. literalinclude:: docs/regional_data.do :linenos: :lines: 70-80 Categorize a federal states variable. .. literalinclude:: docs/regional_data.do :linenos: :lines: 82-115 Put the variables in your preferred order and save your dataset. .. literalinclude:: docs/regional_data.do :linenos: :lines: 117-121 **b) You want to get an initial overview of regional differences in satisfaction with various aspects of life. Use the variable bgsampreg and cross-stabilize the variable with all satisfaction variables to identify differences between East and West Germany, display the absolute and relative frequencies.** To save the tables, save them in a log file. .. literalinclude:: docs/regional_data.do :linenos: :lines: 124-134 .. figure:: png/reg_01.png :align: center .. figure:: png/reg_02.png :align: center .. figure:: png/reg_03.png :align: center To view all tables, look at your generated log file. **c) Now take a closer look at satisfaction with various aspects of life with the help of SOEP regional data. Use the municipal size classes. Create a table showing satisfaction with different aspects of life and highlighting differences by sex, age, municipal size class, and federal state.** .. literalinclude:: docs/regional_data.do :linenos: :lines: 136-143 .. figure:: png/reg_08.png :align: center .. figure:: png/reg_10.png :align: center To view all tables, look at your generated log file. As you can see, SOEP regional data can be used to analyze variables at the lowest regional levels. **d) Create a table that shows political interest differentiated by age, sex, and municipal size class in Bavaria** .. literalinclude:: docs/regional_data.do :linenos: :lines: 145-151 .. figure:: png/reg_11.png :align: center As you have seen here, the SOEP offers a wide range of possibilities for regional analysis. It is possible to allocate a multitude of regional indicators at the level of federal states, regional planning regions, districts, and postal codes. Last change: |today|